/**
 * \brief  Protection domain (Pd) session interface
 * \author Christian Helmuth
 * \date   2006-06-27
 *
 * A pd session represents the protection domain of a program.
 */

/*
 * Copyright (C) 2006-2009 Christian Helmuth
 * Genode Labs, Feske & Helmuth Systementwicklung GbR
 *
 * This file is part of the Genode OS framework, which is distributed
 * under the terms of the GNU General Public License version 2.
 */

#ifndef _INCLUDE__PD_SESSION__PD_SESSION_H_
#define _INCLUDE__PD_SESSION__PD_SESSION_H_

#include <thread/capability.h>

namespace Genode {

	class Pd_session
	{
		protected:

			enum Opcode { BIND_THREAD };

		public:

			static const char *service_name() { return "PD"; }

			virtual ~Pd_session() { }

			/**
			 * Bind thread to protection domain
			 *
			 * \param thread  capability of thread to bind
			 *
			 * \return        zero on success or negative error code
			 *
			 * After successful bind the thread will run inside this protection
			 * domain when started.
			 */
			virtual int bind_thread(Thread_capability thread) = 0;
	};
}

#endif /* _INCLUDE__PD_SESSION__PD_SESSION_H_ */
